package com.edu.hbwe.book.service.impl;

import java.sql.SQLException;

import com.edu.hbwe.book.dao.NoticeDao;
import com.edu.hbwe.book.dao.impl.NoticeDaoImpl;
import com.edu.hbwe.book.entity.Notice;
import com.edu.hbwe.book.service.NoticeService;

public class NoticeServiceImpl implements NoticeService {
	private NoticeDao dao = new NoticeDaoImpl();
	
	
	public Notice getRecentNotice() {
		try {
			return dao.getRecentNotice();
		} catch (SQLException e) {
			throw new RuntimeException("查询最新添加或修改的一条公告失败！");
		}
	}

}
